package net.godcode.olivenotes.entities;

import java.util.Date;
import java.util.List;

/**
 * PostDAO
 * 
 * @author Chris Lewis Dec 26, 2007 <chris@thegodcode.net>
 * @version $Id: PostDAO.java 32 2008-01-22 15:14:31Z burningodzilla $
 */
public interface PostDAO extends GenericDAO<Post, Long> {
	
	Post findById(long id, boolean published);
	
	/**
	 * Find the most recent entities. 
	 * @param count
	 * @return
	 */
	List<Post> findRecent(int count, boolean published);
	
	Post findLast(boolean published);
	
	List<Post> findByTag(String tag, boolean published);
	
	Post findByCreatedAndName(int year, int month, int day, String name);
	
}